#!/bin/bash

clear
pwd=123123
i=0
d=3
while (($i<3))
do
	echo -e  "\e[34myou have $d chances\e[0m"
	read -s -p "please input password:" pwd1
	echo
	if [ -z ${pwd1} ]
	then
		echo -e "\e[31msorry, you must type something\e[0m"
	elif [ $pwd1 != $pwd ]
	then
		echo -e "\e[33mpassword is not ture\e[0m"
	else
		echo -e "\e[32mpassword is true\e[0m"
		exit
	fi
	((i++))
	((d--))
	echo
done
